package com.lenovo.mso2o.entity.g;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

import com.lenovo.mso2o.entity.g.Notification;
import com.lenovo.mso2o.entity.g.Attachment;
import com.lenovo.mso2o.entity.g.Project;
import com.lenovo.mso2o.entity.g.Site;
import com.lenovo.mso2o.entity.g.Station;
import com.lenovo.mso2o.entity.g.Ad;
import com.lenovo.mso2o.entity.g.SysDict;
import com.lenovo.mso2o.entity.g.StepIcon;
import com.lenovo.mso2o.entity.g.FileCache;
import com.lenovo.mso2o.entity.g.SyncCode;
import com.lenovo.mso2o.entity.g.UploadLocation;
import com.lenovo.mso2o.entity.g.AutoSignOrder;
import com.lenovo.mso2o.entity.g.UrlSaver;
import com.lenovo.mso2o.entity.g.AlarmTime;
import com.lenovo.mso2o.entity.g.SlaAlarm;

import com.lenovo.mso2o.entity.g.NotificationDao;
import com.lenovo.mso2o.entity.g.AttachmentDao;
import com.lenovo.mso2o.entity.g.ProjectDao;
import com.lenovo.mso2o.entity.g.SiteDao;
import com.lenovo.mso2o.entity.g.StationDao;
import com.lenovo.mso2o.entity.g.AdDao;
import com.lenovo.mso2o.entity.g.SysDictDao;
import com.lenovo.mso2o.entity.g.StepIconDao;
import com.lenovo.mso2o.entity.g.FileCacheDao;
import com.lenovo.mso2o.entity.g.SyncCodeDao;
import com.lenovo.mso2o.entity.g.UploadLocationDao;
import com.lenovo.mso2o.entity.g.AutoSignOrderDao;
import com.lenovo.mso2o.entity.g.UrlSaverDao;
import com.lenovo.mso2o.entity.g.AlarmTimeDao;
import com.lenovo.mso2o.entity.g.SlaAlarmDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig notificationDaoConfig;
    private final DaoConfig attachmentDaoConfig;
    private final DaoConfig projectDaoConfig;
    private final DaoConfig siteDaoConfig;
    private final DaoConfig stationDaoConfig;
    private final DaoConfig adDaoConfig;
    private final DaoConfig sysDictDaoConfig;
    private final DaoConfig stepIconDaoConfig;
    private final DaoConfig fileCacheDaoConfig;
    private final DaoConfig syncCodeDaoConfig;
    private final DaoConfig uploadLocationDaoConfig;
    private final DaoConfig autoSignOrderDaoConfig;
    private final DaoConfig urlSaverDaoConfig;
    private final DaoConfig alarmTimeDaoConfig;
    private final DaoConfig slaAlarmDaoConfig;

    private final NotificationDao notificationDao;
    private final AttachmentDao attachmentDao;
    private final ProjectDao projectDao;
    private final SiteDao siteDao;
    private final StationDao stationDao;
    private final AdDao adDao;
    private final SysDictDao sysDictDao;
    private final StepIconDao stepIconDao;
    private final FileCacheDao fileCacheDao;
    private final SyncCodeDao syncCodeDao;
    private final UploadLocationDao uploadLocationDao;
    private final AutoSignOrderDao autoSignOrderDao;
    private final UrlSaverDao urlSaverDao;
    private final AlarmTimeDao alarmTimeDao;
    private final SlaAlarmDao slaAlarmDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        notificationDaoConfig = daoConfigMap.get(NotificationDao.class).clone();
        notificationDaoConfig.initIdentityScope(type);

        attachmentDaoConfig = daoConfigMap.get(AttachmentDao.class).clone();
        attachmentDaoConfig.initIdentityScope(type);

        projectDaoConfig = daoConfigMap.get(ProjectDao.class).clone();
        projectDaoConfig.initIdentityScope(type);

        siteDaoConfig = daoConfigMap.get(SiteDao.class).clone();
        siteDaoConfig.initIdentityScope(type);

        stationDaoConfig = daoConfigMap.get(StationDao.class).clone();
        stationDaoConfig.initIdentityScope(type);

        adDaoConfig = daoConfigMap.get(AdDao.class).clone();
        adDaoConfig.initIdentityScope(type);

        sysDictDaoConfig = daoConfigMap.get(SysDictDao.class).clone();
        sysDictDaoConfig.initIdentityScope(type);

        stepIconDaoConfig = daoConfigMap.get(StepIconDao.class).clone();
        stepIconDaoConfig.initIdentityScope(type);

        fileCacheDaoConfig = daoConfigMap.get(FileCacheDao.class).clone();
        fileCacheDaoConfig.initIdentityScope(type);

        syncCodeDaoConfig = daoConfigMap.get(SyncCodeDao.class).clone();
        syncCodeDaoConfig.initIdentityScope(type);

        uploadLocationDaoConfig = daoConfigMap.get(UploadLocationDao.class).clone();
        uploadLocationDaoConfig.initIdentityScope(type);

        autoSignOrderDaoConfig = daoConfigMap.get(AutoSignOrderDao.class).clone();
        autoSignOrderDaoConfig.initIdentityScope(type);

        urlSaverDaoConfig = daoConfigMap.get(UrlSaverDao.class).clone();
        urlSaverDaoConfig.initIdentityScope(type);

        alarmTimeDaoConfig = daoConfigMap.get(AlarmTimeDao.class).clone();
        alarmTimeDaoConfig.initIdentityScope(type);

        slaAlarmDaoConfig = daoConfigMap.get(SlaAlarmDao.class).clone();
        slaAlarmDaoConfig.initIdentityScope(type);

        notificationDao = new NotificationDao(notificationDaoConfig, this);
        attachmentDao = new AttachmentDao(attachmentDaoConfig, this);
        projectDao = new ProjectDao(projectDaoConfig, this);
        siteDao = new SiteDao(siteDaoConfig, this);
        stationDao = new StationDao(stationDaoConfig, this);
        adDao = new AdDao(adDaoConfig, this);
        sysDictDao = new SysDictDao(sysDictDaoConfig, this);
        stepIconDao = new StepIconDao(stepIconDaoConfig, this);
        fileCacheDao = new FileCacheDao(fileCacheDaoConfig, this);
        syncCodeDao = new SyncCodeDao(syncCodeDaoConfig, this);
        uploadLocationDao = new UploadLocationDao(uploadLocationDaoConfig, this);
        autoSignOrderDao = new AutoSignOrderDao(autoSignOrderDaoConfig, this);
        urlSaverDao = new UrlSaverDao(urlSaverDaoConfig, this);
        alarmTimeDao = new AlarmTimeDao(alarmTimeDaoConfig, this);
        slaAlarmDao = new SlaAlarmDao(slaAlarmDaoConfig, this);

        registerDao(Notification.class, notificationDao);
        registerDao(Attachment.class, attachmentDao);
        registerDao(Project.class, projectDao);
        registerDao(Site.class, siteDao);
        registerDao(Station.class, stationDao);
        registerDao(Ad.class, adDao);
        registerDao(SysDict.class, sysDictDao);
        registerDao(StepIcon.class, stepIconDao);
        registerDao(FileCache.class, fileCacheDao);
        registerDao(SyncCode.class, syncCodeDao);
        registerDao(UploadLocation.class, uploadLocationDao);
        registerDao(AutoSignOrder.class, autoSignOrderDao);
        registerDao(UrlSaver.class, urlSaverDao);
        registerDao(AlarmTime.class, alarmTimeDao);
        registerDao(SlaAlarm.class, slaAlarmDao);
    }
    
    public void clear() {
        notificationDaoConfig.getIdentityScope().clear();
        attachmentDaoConfig.getIdentityScope().clear();
        projectDaoConfig.getIdentityScope().clear();
        siteDaoConfig.getIdentityScope().clear();
        stationDaoConfig.getIdentityScope().clear();
        adDaoConfig.getIdentityScope().clear();
        sysDictDaoConfig.getIdentityScope().clear();
        stepIconDaoConfig.getIdentityScope().clear();
        fileCacheDaoConfig.getIdentityScope().clear();
        syncCodeDaoConfig.getIdentityScope().clear();
        uploadLocationDaoConfig.getIdentityScope().clear();
        autoSignOrderDaoConfig.getIdentityScope().clear();
        urlSaverDaoConfig.getIdentityScope().clear();
        alarmTimeDaoConfig.getIdentityScope().clear();
        slaAlarmDaoConfig.getIdentityScope().clear();
    }

    public NotificationDao getNotificationDao() {
        return notificationDao;
    }

    public AttachmentDao getAttachmentDao() {
        return attachmentDao;
    }

    public ProjectDao getProjectDao() {
        return projectDao;
    }

    public SiteDao getSiteDao() {
        return siteDao;
    }

    public StationDao getStationDao() {
        return stationDao;
    }

    public AdDao getAdDao() {
        return adDao;
    }

    public SysDictDao getSysDictDao() {
        return sysDictDao;
    }

    public StepIconDao getStepIconDao() {
        return stepIconDao;
    }

    public FileCacheDao getFileCacheDao() {
        return fileCacheDao;
    }

    public SyncCodeDao getSyncCodeDao() {
        return syncCodeDao;
    }

    public UploadLocationDao getUploadLocationDao() {
        return uploadLocationDao;
    }

    public AutoSignOrderDao getAutoSignOrderDao() {
        return autoSignOrderDao;
    }

    public UrlSaverDao getUrlSaverDao() {
        return urlSaverDao;
    }

    public AlarmTimeDao getAlarmTimeDao() {
        return alarmTimeDao;
    }

    public SlaAlarmDao getSlaAlarmDao() {
        return slaAlarmDao;
    }

}
